package org.flow.basic.thread.future_task;

import java.util.UUID;
import java.util.concurrent.FutureTask;

/**
 * @author xl-9527
 * @since 2025/3/19
 **/
public class FutureTaskDemo {

    public FutureTask<String> nullPointerExceptionSubmit() {
        return new FutureTask<>(() -> {
            String string = UUID.randomUUID().toString();
            if (string.length() >= 100) {
                return string;
            }
            throw new NullPointerException();
        }
        );
    }
}
